import React from 'react';

// 类组件
class Btn1 extends React.Component {
  render() {
    return <button>按钮1{this.props.msg}</button>;
  }
}

// 函数式组件

class App extends React.Component {
  state = {
    msg: '一句话'
  };
  render() {
    return <div>
      <Btn1 msg={this.state.msg}></Btn1>
    </div>;
  }
}


export default App;
